{layout name="layout" /}
<div id="actionbar">
    <a href="{:url('fastshop/category/add',['parent_id'=>$parent_id])}" class="button button-blue"> <i class="iconfont icon-add_icon"></i>增加</a>
    <a href="javascript:;" class="button bar" url="{:url("fastshop/category/alldelete")}" msg="【删除】您确定要删除当前分类? " issale="0"><i class="iconfont icon-lajixiang"></i>删除</a> 
</div>
<table class="table">
    <thead>
        <tr>
            <th class="w60 fn-tac">#</th>
            <th class="w40 fn-tac"><input type="checkbox" onclick="CheckAll(this)"></th>
            <th class="w190">操作</th>
            <th class="w60 fn-tac">排序</th>
            <th><i class="iconfont icon-sousuoleimu"></i>分类名称</th>
            <th class="w100 fn-tac">分类属性</th>
            <th class="w200">分类别名(商品)</th>
            <th class="w140">更新时间</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td class="fn-tac"><a href="{:url('fastshop/item/index',['keyword'=>'*'.$vo.id])}">{$vo.id}</a></td>
            <td class="fn-tac"><input name="ids[]" type="checkbox" value="{$vo.id}"></td>
            <td class="button-group">
                <a class="button" href="{:url('fastshop/category/edit',array('id'=>$vo.id))}"><i class="iconfont icon-edit"></i>编辑</a>
                <a class="button isDel" url="{:url('fastshop/category/delete',array('id'=>$vo.id))}" href="javascript:;"><i class="iconfont icon-lajixiang"></i>删除</a>
            </td>
            <td class="fn-tac"><input name="sort" class="fn-tac w40 input input-mini" type="text" value="{$vo['sort']}" id="{$vo.id}" /></td>
            <td><i class="iconfont icon-arrowdown"></i><a href="{:url('fastshop/category/index',['parent_id'=>$vo.id])}">{$vo.title}</a></td>
            <td class="fn-tac">{if $vo.types}<span class="badge bg-green">首页推荐</span>{else}<span class="badge">默认分类</span>{/if}</td>
            <td>{$vo.name}</td>
            <td>{$vo.update_time|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
    Do('base', 'layer', function () {
        $('.isDel').isDel();
        sort("{:url('fastshop/category/sort')}");
        $(".bar").click(function() {
            var url = $(this).attr('url');
            var msg = $(this).attr('msg');
            tools_submit({action:url,msg:msg})
        })
    })
</script>